<template>
	<view class="page_box">
		<scroll-view scroll-y="true" class="scroll-box">
			<view class="notice-layout">

				<view class="notice-title">{{title}}</view>
				<view class="notice-title-time">{{time}}</view>
				<view class="jui_pad_t20" id="abc" style="width: 95%;margin: 0 auto;">
					<!-- <jyf-parser :html="goodsDetails.content" ref="article"></jyf-parser> -->
					<jyf-parser :html="content" ref="article"></jyf-parser>

				</view>

			</view>
		</scroll-view>
	</view>
</template>

<script>
	import jyfParser from '@/components/jyf-parser/jyf-parser';
	export default {
		components: {
			jyfParser
		},
		data() {
			return {
				noticeId: '',
				content: '',
				title: '',
				time:''
			};
		},
		onLoad(opt) {
			this.noticeId = opt.id
			this.init();
		},
		methods: {
			init() {
				let id = this.noticeId
				this.$api.getNoticeDetail({
					noticeId: id
				}).then(res => {
					if (res.ok) {
						this.content = res.data.content
						this.title = res.data.title
						this.time = res.data.updateTime
					}
				});
			},
		}
	};
</script>

<style lang="scss" scoped>
	@font-face {
		font-family: 'iconfont';
		/* project id 1796157 */
		src: url('//at.alicdn.com/t/font_1796157_616mg8112mu.eot');
		src: url('//at.alicdn.com/t/font_1796157_616mg8112mu.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_1796157_616mg8112mu.woff2') format('woff2'),
			url('//at.alicdn.com/t/font_1796157_616mg8112mu.woff') format('woff'), url('//at.alicdn.com/t/font_1796157_616mg8112mu.ttf') format('truetype'),
			url('//at.alicdn.com/t/font_1796157_616mg8112mu.svg#iconfont') format('svg');
	}

	/* #ifdef MP-TOUTIAO */
	@font-face {
		font-family: uniicons;
		font-weight: normal;
		font-style: normal;
		src: url('~@/static/uni.ttf') format('truetype');
	}

	/* #endif */
	.notice-title {
		margin: 0 auto;
		display: flex;
		justify-content: center;
		height: 75rpx;
		width: 95%;
		align-items: center;
		font-weight: bold;
	}
	.notice-title-time{
		margin: 0 auto;
		display: flex;
		justify-content: center;
		height: 40rpx;
		width: 95%;
		align-items: center;
	}
</style>
